package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 发货单主记录实体类
 *
 * @author 吴旭
 */
public class ShippingOrderHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -5577096477716864530L;
    private Long HeaderId;
    private String BillNo;
    private Long DoHeaderId;
    private String DoBillNo;
    private String CustomerName;
    private Timestamp DateOfDelivery;
    private Long GarmentFactoryId;
    private String GarmentFactoryName;
    private String ShippingTypeName;       // 运输方式
    private String ResponsibleByName;      // 负责人
    private String SoNo;                   // 主合同号（即销售订单号）
    private String StyleNo;
    private Float GrossWeight;
    private Float NetWeight;
    private Float Cubage;
    private Integer InCase;
    private String Description;
    private Integer TotalQuantity;         // 总数量
    private Integer TotalCaseQuantity;     // 总箱数
    private String ShippingMarkNo;         // 唛头号（销售发票用）

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getBillNo() {
        return BillNo;
    }

    public void setBillNo(String BillNo) {
        this.BillNo = BillNo;
    }

    public Long getDoHeaderId() {
        return DoHeaderId;
    }

    public void setDoHeaderId(Long DoHeaderId) {
        this.DoHeaderId = DoHeaderId;
    }

    public String getDoBillNo() {
        return DoBillNo;
    }

    public void setDoBillNo(String DoBillNo) {
        this.DoBillNo = DoBillNo;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfDelivery() {
        return DateOfDelivery;
    }

    public void setDateOfDelivery(Timestamp DateOfDelivery) {
        this.DateOfDelivery = DateOfDelivery;
    }

    public Long getGarmentFactoryId() {
        return GarmentFactoryId;
    }

    public void setGarmentFactoryId(Long GarmentFactoryId) {
        this.GarmentFactoryId = GarmentFactoryId;
    }

    public String getGarmentFactoryName() {
        return GarmentFactoryName;
    }

    public void setGarmentFactoryName(String GarmentFactoryName) {
        this.GarmentFactoryName = GarmentFactoryName;
    }

    public String getShippingTypeName() {
        return ShippingTypeName;
    }

    public void setShippingTypeName(String ShippingTypeName) {
        this.ShippingTypeName = ShippingTypeName;
    }

    public String getResponsibleByName() {
        return ResponsibleByName;
    }

    public void setResponsibleByName(String ResponsibleByName) {
        this.ResponsibleByName = ResponsibleByName;
    }

    public String getSoNo() {
        return SoNo;
    }

    public void setSoNo(String SoNo) {
        this.SoNo = SoNo;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public Float getGrossWeight() {
        return GrossWeight;
    }

    public void setGrossWeight(Float GrossWeight) {
        this.GrossWeight = GrossWeight;
    }

    public Float getNetWeight() {
        return NetWeight;
    }

    public void setNetWeight(Float NetWeight) {
        this.NetWeight = NetWeight;
    }

    public Float getCubage() {
        return Cubage;
    }

    public void setCubage(Float Cubage) {
        this.Cubage = Cubage;
    }

    public Integer getInCase() {
        return InCase;
    }

    public void setInCase(Integer InCase) {
        this.InCase = InCase;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Integer getTotalQuantity() {
        return TotalQuantity;
    }

    public void setTotalQuantity(Integer TotalQuantity) {
        this.TotalQuantity = TotalQuantity;
    }

    public Integer getTotalCaseQuantity() {
        return TotalCaseQuantity;
    }

    public void setTotalCaseQuantity(Integer TotalCaseQuantity) {
        this.TotalCaseQuantity = TotalCaseQuantity;
    }

    public String getShippingMarkNo() {
        return ShippingMarkNo;
    }

    public void setShippingMarkNo(String ShippingMarkNo) {
        this.ShippingMarkNo = ShippingMarkNo;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ShippingOrderHeaderEntity)) {
            return false;
        }

        final ShippingOrderHeaderEntity that = (ShippingOrderHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
